cancellable, error);
}
- const gboolean need_open =
- (out_fd || out_xattrs || self->mode == OSTREE_REPO_MODE_BARE_USER);
+ const gboolean need_open = (out_fd ||
+ (out_xattrs && self->mode == OSTREE_REPO_MODE_BARE) ||
+ self->mode == OSTREE_REPO_MODE_BARE_USER);
/* If it's a regular file and we're requested to return the fd, do it now. As
* a special case in bare-user, we always do an open, since the stat() metadata
* lives there.
ret_xattrs = g_variant_ref_sink (g_variant_builder_end (&builder));
}
}
- else
+ else if (self->mode == OSTREE_REPO_MODE_BARE)
{
- g_assert (self->mode == OSTREE_REPO_MODE_BARE);
-
if (S_ISREG (stbuf.st_mode) && out_xattrs)
{
if (self->disable_xattrs)
return FALSE;
}
}
+ else
+ {
+ g_assert_not_reached ();
+ }
if (out_fd)
*out_fd = glnx_steal_fd (&fd);